#include <iostream>
using namespace std;
class A{
public:
	A(int i):x(i)
	{}
	A()
	{x=0;}
	friend A operator ++(A a);
	friend A operator --(A &a);
	void print();
private :
	int x;
};
A operator ++ (A a)
{++a.x;
return a;}
A operator --(A &a)
{--a.x;
return a;}
void A::print()
{cout<<x<<endl;}
int main()
{A a(7);
++a;
a.print();
--a;
a.print();
return 0;}

